package cn.liccshop.core.backstage.sysSysMenu.controller;


import cn.liccshop.core.backstage.sysSysMenu.service.ISysSysMenuService;
import cn.liccshop.core.entity.SysSysMenu;
import cn.liccshop.sys.base.MyActionController;
import cn.liccshop.sys.constants.Constants;
import cn.liccshop.sys.entity.Result;
import cn.liccshop.sys.exception.MySystemException;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @description 菜单表 前端控制器
 *
 * @author LiCC
 * @since 2019-04-05
 */
@RestController
@RequestMapping("/sysSysMenu")
public class SysSysMenuController extends MyActionController<SysSysMenu> {

    @Autowired
    private ISysSysMenuService liSysSysMenuService;

    @Override
    protected IService<SysSysMenu> getLiService(){
        return liSysSysMenuService;
    }

    @ResponseBody
    @RequestMapping("/list")
    public Result getlist(@RequestBody SysSysMenu sysSysMenu) throws MySystemException {
        List<SysSysMenu> data = liSysSysMenuService.getList(sysSysMenu);
        return new Result().setCode(Constants.OK).setData(data);
    }
}

